package band.wukong.practice.springboot.spring4.advanced.async;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @author wukong(wukonggg@139.com)
 */
@Component
public class AsyncTaskService {

    private static final Logger logger = LoggerFactory.getLogger(AsyncTaskService.class);

    @Async
    public void executeaAyncTask(Integer i) {
        logger.info("异步执行任务: " + i);
    }

    @Async
    public void executeAsyncTaskPlus(Integer i) {
        logger.info("异步执行任务Plus: " + (i + 1));
    }

}
